package com.aqie.rabbit.test.fourThread;

/**
 * 加synchronized :1010  1210
 * 不加           ：-1100  0011
 */
public class FourThread {
    public static void main(String[] args) {
        Data data = new Data();
        Add add = new Add(data);
        Dec dec = new Dec(data);
        for (int i = 0; i < 2; ++i) {
            new Thread(add, "线程A").start();
            new Thread(dec, "线程B").start();
        }

    }
}
